|
|
|
BlueCielo Meridian Enterprise Server 2013 Administrator's Guide | BlueCielo ECM Solutions |
To register documents with the Task Server, you submit a task to the Task Server from your program. You submit the task to the MeridianTask object that is instantiated by a Publisher extension for the PowerUser program. That extension is registered as described in Configuring a Meridian Enterprise application server. The Task Server executes the task using the options of the publishing job that is specified by the name that you pass to the MeridianTask object. For information about programmatically registering documents without using the Task Server, see Registering programmatically without the Task Server.
Notes Using the MeridianTask object requires the following:
To register documents using the Task Server:
The task can be submitted by any event or command where a Document object exists. For more information about the Submit method, see the BlueCielo Meridian Enterprise VBScript API Reference.
Note In VBScript, you only have access to the selected document; therefore, publishing tasks can only be created for the selected document.
Example using Meridian Enterprise VBScript
Sub PublishCommand_Execute(Batch) ' Set arguments for the task. Vault.Task.Set "JobCode", "3BA9DF" Vault.Task.Set "FeedBackProperty", "Custom.PublishStatus" ' Register the selected document for publishing. Vault.Task.Submit "BCPublisher.MeridianTask", Document End Sub
Example using a Meridian Enterprise VB.NET extension
Private Sub btnPublish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles btnPublish.Click ' Get the selected document to publish. Dim document As BCDocument = ExtensionHost.CurrentObject ' Set arguments for the task. Dim task As BCSTask = ExtensionHost.ScriptObjects.Vault.Task task.Set("JobCode", "3BA9DF") task.Set("FeedbackProperty", "Custom.PublishStatus") ' Register the document for publishing. task.Submit("BCPublisher.MeridianTask", document) End Sub
Example using a Meridian Enterprise VB.NET application (server API)
Private Sub DoIt(ByVal repository As BCRepository) ' Get document to publish. Dim document As BCDocument = repository.GetFSObject("\MyDocument.doc") Using taskServer As BCTaskServer = New BCTaskServer(repository.AMServer.AMTaskServerMachine) ' Set arguments for the task. Dim args As Dictionary(Of String, Object) = New Dictionary(Of String, Object) args("JobCode") = "3BA9DF" args("FeedbackProperty") = "Custom.PublishStatus" ' Register the document for publishing. taskServer.SubmitTask( _ "BCPublisher.MeridianTask", _ args, _ Nothing, _ 0, _ document.ID, _ Nothing, _ Nothing, _ Nothing, _ Nothing) End Using End Sub
Example using a Meridian Enterprise VB.NET application (client API)
Private Sub DoIt(ByVal repository As BCRepository) ' Get document to publish. Dim document As BCDocument = repository.GetFSObject("\MyDocument.doc") Using services As BCServiceProvider = New BCServiceProvider(repository) Using metadata As BCSMetadata = New BCSMetadata(services) ' Set arguments for the task. Dim task As BCSTask = metadata.Vault.Task task.Set("JobCode", "3BA9DF") task.Set("FeedbackProperty", "Custom.PublishStatus") ' Register the document for publishing. task.Submit("BCPublisher.MeridianTask", document) End Using End Using End Sub
Related concepts
Registering documents for publication
Related tasks
Copyright © 2000-2014 BlueCielo ECM Solutions |